Optimal. Leaf size=165 \[ -\frac {x^2}{a^2 d}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}+\frac {2 x \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {x^2 \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d}+\frac {2 \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3}-\frac {2 x \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}+\frac {2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.28, antiderivative size = 165, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 9, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.529, Rules used = {2216, 2215,
2221, 2611, 2320, 6724, 2222, 2317, 2438} \begin {gather*} \frac {2 \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3}+\frac {2 \text {PolyLog}\left (3,-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3}-\frac {2 x \text {PolyLog}\left (2,-\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}+\frac {2 x \log \left (\frac {b e^{c+d x}}{a}+1\right )}{a^2 d^2}-\frac {x^2 \log \left (\frac {b e^{c+d x}}{a}+1\right )}{a^2 d}-\frac {x^2}{a^2 d}+\frac {x^3}{3 a^2}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2215
Rule 2216
Rule 2221
Rule 2222
Rule 2317
Rule 2320
Rule 2438
Rule 2611
Rule 6724
Rubi steps
\begin {align*} \int \frac {x^2}{\left (a+b e^{c+d x}\right )^2} \, dx &=\frac {\int \frac {x^2}{a+b e^{c+d x}} \, dx}{a}-\frac {b \int \frac {e^{c+d x} x^2}{\left (a+b e^{c+d x}\right )^2} \, dx}{a}\\ &=\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}-\frac {b \int \frac {e^{c+d x} x^2}{a+b e^{c+d x}} \, dx}{a^2}-\frac {2 \int \frac {x}{a+b e^{c+d x}} \, dx}{a d}\\ &=-\frac {x^2}{a^2 d}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}-\frac {x^2 \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d}+\frac {2 \int x \log \left (1+\frac {b e^{c+d x}}{a}\right ) \, dx}{a^2 d}+\frac {(2 b) \int \frac {e^{c+d x} x}{a+b e^{c+d x}} \, dx}{a^2 d}\\ &=-\frac {x^2}{a^2 d}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}+\frac {2 x \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {x^2 \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d}-\frac {2 x \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {2 \int \log \left (1+\frac {b e^{c+d x}}{a}\right ) \, dx}{a^2 d^2}+\frac {2 \int \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right ) \, dx}{a^2 d^2}\\ &=-\frac {x^2}{a^2 d}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}+\frac {2 x \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {x^2 \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d}-\frac {2 x \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {2 \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{a}\right )}{x} \, dx,x,e^{c+d x}\right )}{a^2 d^3}+\frac {2 \text {Subst}\left (\int \frac {\text {Li}_2\left (-\frac {b x}{a}\right )}{x} \, dx,x,e^{c+d x}\right )}{a^2 d^3}\\ &=-\frac {x^2}{a^2 d}+\frac {x^2}{a d \left (a+b e^{c+d x}\right )}+\frac {x^3}{3 a^2}+\frac {2 x \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}-\frac {x^2 \log \left (1+\frac {b e^{c+d x}}{a}\right )}{a^2 d}+\frac {2 \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3}-\frac {2 x \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^2}+\frac {2 \text {Li}_3\left (-\frac {b e^{c+d x}}{a}\right )}{a^2 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.20, size = 113, normalized size = 0.68 \begin {gather*} \frac {\frac {d^2 x^2 \left (a d x+b e^{c+d x} (-3+d x)\right )}{a+b e^{c+d x}}-3 d x (-2+d x) \log \left (1+\frac {b e^{c+d x}}{a}\right )+(6-6 d x) \text {Li}_2\left (-\frac {b e^{c+d x}}{a}\right )+6 \text {Li}_3\left (-\frac {b e^{c+d x}}{a}\right )}{3 a^2 d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(323\) vs.
\(2(157)=314\).
time = 0.05, size = 324, normalized size = 1.96
method | result | size |
risch | \(\frac {x^{2}}{a d \left (a +b \,{\mathrm e}^{d x +c}\right )}+\frac {c^{2} \ln \left ({\mathrm e}^{d x +c}\right )}{d^{3} a^{2}}-\frac {c^{2} \ln \left (a +b \,{\mathrm e}^{d x +c}\right )}{d^{3} a^{2}}+\frac {x^{3}}{3 a^{2}}-\frac {c^{2} x}{d^{2} a^{2}}-\frac {2 c^{3}}{3 d^{3} a^{2}}-\frac {x^{2} \ln \left (1+\frac {b \,{\mathrm e}^{d x +c}}{a}\right )}{a^{2} d}+\frac {\ln \left (1+\frac {b \,{\mathrm e}^{d x +c}}{a}\right ) c^{2}}{d^{3} a^{2}}-\frac {2 x \polylog \left (2, -\frac {b \,{\mathrm e}^{d x +c}}{a}\right )}{a^{2} d^{2}}+\frac {2 \polylog \left (3, -\frac {b \,{\mathrm e}^{d x +c}}{a}\right )}{a^{2} d^{3}}+\frac {2 c \ln \left ({\mathrm e}^{d x +c}\right )}{d^{3} a^{2}}-\frac {2 c \ln \left (a +b \,{\mathrm e}^{d x +c}\right )}{d^{3} a^{2}}-\frac {x^{2}}{a^{2} d}-\frac {2 c x}{d^{2} a^{2}}-\frac {c^{2}}{d^{3} a^{2}}+\frac {2 x \ln \left (1+\frac {b \,{\mathrm e}^{d x +c}}{a}\right )}{a^{2} d^{2}}+\frac {2 \ln \left (1+\frac {b \,{\mathrm e}^{d x +c}}{a}\right ) c}{d^{3} a^{2}}+\frac {2 \polylog \left (2, -\frac {b \,{\mathrm e}^{d x +c}}{a}\right )}{a^{2} d^{3}}\) | \(324\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 149, normalized size = 0.90 \begin {gather*} \frac {x^{2}}{a b d e^{\left (d x + c\right )} + a^{2} d} + \frac {d^{3} x^{3} - 3 \, d^{2} x^{2}}{3 \, a^{2} d^{3}} - \frac {d^{2} x^{2} \log \left (\frac {b e^{\left (d x + c\right )}}{a} + 1\right ) + 2 \, d x {\rm Li}_2\left (-\frac {b e^{\left (d x + c\right )}}{a}\right ) - 2 \, {\rm Li}_{3}(-\frac {b e^{\left (d x + c\right )}}{a})}{a^{2} d^{3}} + \frac {2 \, {\left (d x \log \left (\frac {b e^{\left (d x + c\right )}}{a} + 1\right ) + {\rm Li}_2\left (-\frac {b e^{\left (d x + c\right )}}{a}\right )\right )}}{a^{2} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 263, normalized size = 1.59 \begin {gather*} \frac {a d^{3} x^{3} + a c^{3} + 3 \, a c^{2} - 6 \, {\left (a d x + {\left (b d x - b\right )} e^{\left (d x + c\right )} - a\right )} {\rm Li}_2\left (-\frac {b e^{\left (d x + c\right )} + a}{a} + 1\right ) + {\left (b d^{3} x^{3} - 3 \, b d^{2} x^{2} + b c^{3} + 3 \, b c^{2}\right )} e^{\left (d x + c\right )} - 3 \, {\left (a c^{2} + 2 \, a c + {\left (b c^{2} + 2 \, b c\right )} e^{\left (d x + c\right )}\right )} \log \left (b e^{\left (d x + c\right )} + a\right ) - 3 \, {\left (a d^{2} x^{2} - a c^{2} - 2 \, a d x - 2 \, a c + {\left (b d^{2} x^{2} - b c^{2} - 2 \, b d x - 2 \, b c\right )} e^{\left (d x + c\right )}\right )} \log \left (\frac {b e^{\left (d x + c\right )} + a}{a}\right ) + 6 \, {\left (b e^{\left (d x + c\right )} + a\right )} {\rm polylog}\left (3, -\frac {b e^{\left (d x + c\right )}}{a}\right )}{3 \, {\left (a^{2} b d^{3} e^{\left (d x + c\right )} + a^{3} d^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {x^{2}}{a^{2} d + a b d e^{c + d x}} + \frac {\int \left (- \frac {2 x}{a + b e^{c} e^{d x}}\right )\, dx + \int \frac {d x^{2}}{a + b e^{c} e^{d x}}\, dx}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^2}{{\left (a+b\,{\mathrm {e}}^{c+d\,x}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________